import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'
import * as API from "@/http/api"

// 导入normalize.css
// import 'normalize.css'
// 引入公共样式
import '@/assets/css/public.css'
import { Result } from 'element-ui'

import * as Filter from "@/filter/filter"
import Moment from 'moment'
// 导入normalize.css
import 'nprogress/nprogress.css'


//引入vue-quill-editor富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
//引入vue-quill-editor富文本编辑器css样式
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme
// 注册
Vue.use(VueQuillEditor)

Vue.config.productionTip = false
Vue.prototype.$API = API
// 
Vue.filter('rank',function (v) {
   let result;
  switch (v*1){
    case 0 : result = "一级权限";break;
    case 1 : result = "二级权限";break;
    case 2 : result = "三级权限";break;
    default : result = "没有权限等级";
  }
  return result;
})
// 
Vue.filter('catelevels',function (v) {
   let result;
  switch (v*1){
    case 0 : result = "一级";break;
    case 1 : result = "二级";break;
    case 2 : result = "三级";break;
    default : result = "没有等级";
  }
  return result;
})
// 
Vue.filter('pay',function (v) {
   let result;
  switch (v*1){
    case 0 : result = "未付款";break;
    case 1 : result = "已付款";break;
    default : result = "";
  }
  return result;
})
// 处理日期时间的过滤器
// Vue.filter("dateTime",function (v) {
//   return Moment(v*1000).format('YYYY-MM-DD HH:mm:ss')
// })

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
